package com.bgIntlgn.client.entity.jishubu;

import yuhuibear.poat.annotations.relation.View;
import yuhuibear.poat.object.bean.Bean;

/**
 * 最新ElementSubversion视图
 * 
 * @author Simon Chen
 */
@View(name = "latestelementsubversion_view", sqlToCreate = "select elements_view.id as elementid, elements_view.elementname as elementname, "
		+ "elements_view.oem as oem, elements_view.typename as typename, es.uid as uid, "
		+ " materials.name as materialname, implementMethod_view.name as implementmethodname "
		+ "from element_subversions as es, (select e.id as id, e.name as elementname, e.oem as oem, d.name as typename "
		+ "from elements as e, dictionarys as d  "
		+ "where e.type = d.id) as elements_view, (select d.id as id, d.name as name "
		+ "from dictionarys as d where d.type = '产品实现方式') as implementMethod_view, materials "
		+ "where elements_view.id=es.element_id and es.material_id=materials.id and es.impl_method=implementMethod_view.id and "
		+ "es.create_time in (select max(create_time) "
		+ "from element_subversions group by element_id)")
public class LatestElementSubversionView implements Bean {

	private Long elementid;
	private String elementname;
	private boolean oem;
	private String typename;
	private String uid;
	private String materialname;
	private String implementmethodname;

	public Long getElementid() {
		return elementid;
	}

	public void setElementid(Long elementid) {
		this.elementid = elementid;
	}

	public String getImplementmethodname() {
		return implementmethodname;
	}

	public void setImplementmethodname(String implementmethodname) {
		this.implementmethodname = implementmethodname;
	}

	public String getElementname() {
		return elementname;
	}

	public void setElementname(String elementname) {
		this.elementname = elementname;
	}

	public boolean isOem() {
		return oem;
	}

	public void setOem(boolean oem) {
		this.oem = oem;
	}

	public String getTypename() {
		return typename;
	}

	public void setTypename(String typename) {
		this.typename = typename;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getMaterialname() {
		return materialname;
	}

	public void setMaterialname(String materialname) {
		this.materialname = materialname;
	}
}
